﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/BMP_List.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Pages_BdReviews_Default" %>

<asp:Content ID="contentHeader" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="contentSearch" ContentPlaceHolderID="contentPlaceHolderToolBar"
    runat="Server">
    
    <asp:DropDownList ID="ddlHostName" runat="server" Field="hostname" Opt="=" Width="135px">
    </asp:DropDownList>
     <asp:DropDownList ID="ddlArea" runat="server" Field="Area" Opt="=" Width="135px">
 
    </asp:DropDownList>
    模糊查询
    <asp:TextBox runat="server" ID="txtAll" Field="CustomerName,Content,HostName" Opt="%"
        ToolTip="客户名称，评论内容，网站" Width="192">
    </asp:TextBox>
    <br />&nbsp;
    评论日期
    <asp:TextBox ID="fromData" runat="server" Field="ReviewDate" Opt="&#62;=" onFocus="GetMaxDate('toData','yyyy-MM-dd HH:mm:ss');"
        islongdate="true" ClientIDMode="Static" Width="120">

    </asp:TextBox>
    至
    <asp:TextBox ID="toData" runat="server" Field="ReviewDate" Opt="&#60;=" onFocus="GetMinDate('fromData','yyyy-MM-dd HH:mm:ss');"
        ClientIDMode="Static" Width="120">
    </asp:TextBox>
    回复内容
    <asp:TextBox runat="server" ID="txtReply"> </asp:TextBox>
    <asp:Button Text="批量回复" runat="server" ID="btnReply" OnClick="btnReply_Click"  />
    <asp:Button Text="批量发布" runat="server" ID="btnPublish" OnClick="btnPublish_Click" />

 每页显示
    <asp:TextBox runat="server" ID="txtPageSize" Text="20" Width="50">
    </asp:TextBox>
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="contentPlaceHolder" runat="Server">
    <asp:GridView ClientIDMode="Static" ID="gvInfos" runat="server">
        <Columns>
            <asp:TemplateField ItemStyle-Width="50">
                <HeaderTemplate>
                    <input id="cbhALL" type="checkbox" onclick="SelectAll('gvInfos', this, 'cbItem');" /><label
                        for="cbhALL"></label>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="cbItem" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField SortExpression="HostName" HeaderText="网站">
                <ItemTemplate>
                <asp:Label runat="server" Text='<%# Eval("HostName") != null && Eval("HostName").ToString().Length > 20 ? Eval("HostName").ToString().Substring(0, 20) + "..." : Eval("HostName")%>' ToolTip='<%# Eval("HostName")%>'></asp:Label>
                    
                    </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CustomerName" SortExpression="CustomerName" HeaderText="客户名称" />
            <asp:TemplateField SortExpression="ReviewDate" HeaderText="评论时间">
                <ItemTemplate>
                    <%# Eval("ReviewDate")%></ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="BdReviewsInfo_ReviewDate" onclick="WdatePicker();"
                        Text='<%# Eval("ReviewDate")%>' /></EditItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Content" SortExpression="Content" HeaderText="评论内容" />
             <asp:TemplateField SortExpression="IsPublish" HeaderText="是否发布">
                <ItemTemplate>
                    <%# Eval("IsPublish") != null && Eval("IsPublish").ToString().ToLower() == "true" ? "是" : "否"%></ItemTemplate>
                <EditItemTemplate>
                    <asp:CheckBox runat="server" ID="BdReviewsInfo_IsPublish" Checked='<%# Eval("IsPublish") != null && Eval("IsPublish").ToString().ToLower() == "true" ? true : false %>' /></EditItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ReplyBy" SortExpression="ReplyBy" HeaderText="回复者" />
                    <asp:CommandField ShowEditButton="true" EditText="编辑" HeaderText="编辑" ItemStyle-Width="80" />
            <asp:TemplateField HeaderText="删除" ItemStyle-Width="50">
                <ItemTemplate>
                    <asp:LinkButton ID="lbDelete" Text="删除" CausesValidation="true" CommandName="Delete"
                        OnClientClick="return confirm('确定删除吗？');" runat="server">
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField HeaderText="修改" Text="修改" DataNavigateUrlFields="ManageEditURI"
                ItemStyle-Width="50" />
        </Columns>
    </asp:GridView>
</asp:Content>
